require 'v1/rest.rb'

class Rest
	#~ alias :Rest.getOldResource :Rest.getResource
	
	#~ def self.getResource request, resource_name = ''
		#~ self.getOldResource request, resource_name
		#~ m = request.match(/^([A-Z]+?) \/#{resource_name}(.*) HTTP\/1.1$/)
		
		#~ if m then
			#~ rest = RESTResource.new
			#~ rest.name = resource_name
			#~ rest.method = m[1]
			#~ if m = m[2].match(/^\?(.*)$/) then
				#~ m[1].split('&').each do |var|
					#~ key, value = var.split('=')
					#~ rest[key] = value.to_i
				#~ end
			#~ end
			#~ return rest
		#~ end
		
		#~ return nil
	#~ end
end
